<!DOCTYPE html>
<html lang="en">
	<head>
		<meta charset="UTF-8">
		<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
		<meta name="viewport" content="width=device-width, initial-scale=1">
		<title></title>
		<style>


			/*定义滚动条高宽及背景 高宽分别对应横竖滚动条的尺寸*/
			::-webkit-scrollbar{
				width: 5px;
				height: 5px;
				background-color: #F5F5F5;
			}

			/*定义滚动条轨道 内阴影+圆角*/
			::-webkit-scrollbar-track {
				box-shadow: inset 0 0 6px rgba(0, 0, 0, 0.3);
				-webkit-box-shadow: inset 0 0 6px rgba(0, 0, 0, 0.3);
				border-radius: 10px;
				background-color: #F5F5F5;
			}

			/*定义滑块 内阴影+圆角*/
			::-webkit-scrollbar-thumb{
				border-radius: 10px;
				box-shadow: inset 0 0 6px rgba(0, 0, 0, .1);
				-webkit-box-shadow: inset 0 0 6px rgba(0, 0, 0, .1);
				/*滚动条的颜色*/
				background-color: #00BFFF;
			}





			html,body{
				width: 100%;
				height: 100%;
			}
			*{
				padding: 0;
				margin: 0;
			}
			.preview_main_page{
				display: flex;
				width:100%;
				height:100%;
				flex-direction:column;
			}

            /*场景部分*/
			.preview_main_page_center{
				height:100%;
				flex-grow:1;
				display: flex;
				justify-content:safe center;
				align-items: center;
				overflow:auto;
			}
			
			.layui-btn{
				background-color:#409eff!important;
			}
		</style>
		<!--layui框架-->
		<link rel="stylesheet" href="js/plugIn/layui-master/src/css/layui.css">
		<script src="js/plugIn/jquery/jquery.min.js"></script><!--jquery 要在layui之前，这样layui就不会加载内部的jquery-->
		<script src="js/plugIn/layui-master/src/layui.js"></script>
		<script src="js/common/tool.js"></script>
	</head>
	<body>
		<div class="preview_main_page">
			<div class="preview_main_page_center">
				<form class="layui-form" action="" id="valueform"  lay-filter="valueform">
					<!-- <div class="layui-form-item" style="margin: 5px;">
						<label class="layui-form-label">设置值为</label>
						<div class="layui-input-block">
							<input type="text" name="valueStr" id="valueStr"  autocomplete="off" placeholder="请填入需要设置的值" class="layui-input">
						</div>
					</div>
					<div class="layui-form-item"  style="margin: 15px 5px 5px 5px">
						<div class="layui-input-block">
							<input type="button" onclick="okClick()" class="layui-btn" value="确定"/>
						</div>
					</div> -->
					<div class="layui-form-item">
						<div class="layui-inline">
							<label class="layui-form-label">设置值为:</label>
							<div class="layui-input-inline">
								<input type="text" name="valueStr" id="valueStr"  autocomplete="off" placeholder="请填入需要设置的值" class="layui-input">
							</div>
						</div>
						<div class="layui-inline">
							<div class="layui-input-inline" style = 'width:70px'>
								<input type="button" onclick="okClick()" class="layui-btn" value="确定"/>
							</div>
						</div>
					</div>

			  </form>
			</div>



		</div>
	</body>
<script>
	var index = parent.layer.getFrameIndex(window.name);
	var defauleValue = decodeURI(decodeURI($_GET.defauleValue));
	var sssjValue = decodeURI(decodeURI($_GET.sssjValue));
    //优先显示当前值
	// if(sssjValue=="undefined"){
	// 	$("#valueStr").val(defauleValue);
	// }else{
	// 	$("#valueStr").val('');
	// 	$("#valueStr").attr('placeholder',sssjValue);
	// }
	//优先显示默认值
	if(defauleValue=="undefined"){
		$("#valueStr").val(sssjValue);
	}else{
		$("#valueStr").val(defauleValue);
	}



	layui.use(['form'], function() {
		var form = layui.form;


	});

	//点击确认按钮
	function okClick(){
        //得到需要取数据的id；
		var values = $("#valueStr").val();

		parent.stageView.writeValue = values;
		parent.layer.close(index);
	}


</script>
</html>
